import { mm, type MockApplication } from '@eggjs/mock';
import { describe, it, afterAll, beforeAll } from 'vitest';

import { getFixtures } from './utils.ts';

describe('test/executeError-task-generator.test.ts', () => {
  let app: MockApplication;
  beforeAll(async () => {
    app = mm.cluster({
      baseDir: getFixtures('executeError-task-generator'),
      workers: 1,
    });
    // app.debug();
    await app.ready();
  });
  afterAll(() => app.close());

  it('should schedule execute task is generator function', async () => {
    app.expect('stderr', /"task" generator function is not support, should use async function instead/);
  });
});
